54d39e7901978db61cd0cc36c9aaa81c609edf61,src/main/java/com/builtbroken/assemblyline/armbot/command/TaskRotateTo.java,TaskRotateTo,onUpdate,#,53
Before Change
{
((IArmbot) this.program.getMachine()).moveArmTo(this.targetRotationYaw, this.targetRotationPitch);
return Math.abs(((IArmbot) this.program.getMachine()).getRotation().y - this.targetRotationPitch) > 0 && Math.abs(((IArmbot) this.program.getMachine()).getRotation().x - this.targetRotationYaw) > 0 ? ProcessReturn.CONTINUE : ProcessReturn.DONE;
}
return ProcessReturn.GENERAL_ERROR;
}
After Change
if (super.onUpdate() == ProcessReturn.CONTINUE)
{
((IArmbot) this.program.getMachine()).moveArmTo(this.targetRotationYaw, this.targetRotationPitch);
int deltaYaw = Math.abs(((IArmbot) this.program.getMachine()).getRotation().intY() - this.targetRotationPitch);
int deltaPitch = Math.abs(((IArmbot) this.program.getMachine()).getRotation().intX() - this.targetRotationYaw);
return deltaYaw > 0 && deltaPitch > 0 ? ProcessReturn.CONTINUE : ProcessReturn.DONE;
}
return ProcessReturn.GENERAL_ERROR;
}